package com.bean.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 员工实体
 */
public class Staff implements Serializable{

    private static final long serialVersionUID = 1L;
    /** 员工id*/
    private Integer id;
    /** 员工账号*/
    private String userName;
    /**密码*/
    private String password;
    /**真实姓名 */
    private String realName;
    /**性别 */
    private Integer gender;
    /**生日 */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    private Date birthday;
    /**状态*/
    private Integer state;  //状态, 1正常, 2离职
    /**职务id*/
    private Integer roleId;
    /**入职日期*/
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    private Date hireDate;
    /**部门id*/
    private Integer deptId;
    /**身份证号*/
    private String idcard;
    /** 学历*/
    private  Integer education;
    /** 政治面貌*/
    private Integer political;


    public Staff() {
    }

    public Staff(Integer id, String userName, String password, String realName, Integer gender, Date birthday, Integer state, Integer roleId, Date hireDate, Integer deptId, String idcard, Integer education, Integer political) {
        this.id = id;
        this.userName = userName;
        this.password = password;
        this.realName = realName;
        this.gender = gender;
        this.birthday = birthday;
        this.state = state;
        this.roleId = roleId;
        this.hireDate = hireDate;
        this.deptId = deptId;
        this.idcard = idcard;
        this.education = education;
        this.political = political;
    }

    public Staff(String userName, String password, String realName, Integer gender, Date birthday, Integer state, Integer roleId, Date hireDate, Integer deptId, String idcard, Integer education, Integer political) {
        this.userName = userName;
        this.password = password;
        this.realName = realName;
        this.gender = gender;
        this.birthday = birthday;
        this.state = state;
        this.roleId = roleId;
        this.hireDate = hireDate;
        this.deptId = deptId;
        this.idcard = idcard;
        this.education = education;
        this.political = political;
    }

    public Staff(String userName) {
        this.userName = userName;
    }

    public Staff(Integer id) {
        this.id = id;
    }

    public Integer getDeptId() {
        return deptId;
    }

    public void setDeptId(Integer deptId) {
        this.deptId = deptId;
    }

    public String getIdcard() {
        return idcard;
    }

    public void setIdcard(String idcard) {
        this.idcard = idcard;
    }

    public Integer getEducation() {
        return education;
    }

    public void setEducation(Integer education) {
        this.education = education;
    }

    public Integer getPolitical() {
        return political;
    }

    public void setPolitical(Integer political) {
        this.political = political;
    }

    @Override
    public String toString() {
        return "Staff{" +
                "id=" + id +
                ", userName='" + userName + '\'' +
                ", password='" + password + '\'' +
                ", realName='" + realName + '\'' +
                ", gender=" + gender +
                ", birthday=" + birthday +
                ", state=" + state +
                ", roleId=" + roleId +
                ", hireDate=" + hireDate +
                ", deptId=" + deptId +
                ", idcard='" + idcard + '\'' +
                ", education=" + education +
                ", political=" + political +
                '}';
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public Integer getGender() {
        return gender;
    }

    public void setGender(Integer gender) {
        this.gender = gender;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Integer getRoleId() {
        return roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    public Date getHireDate() {
        return hireDate;
    }

    public void setHireDate(Date hireDate) {
        this.hireDate = hireDate;
    }
}
